/*2S7LXljdWdGhrCxZ1MFl4i0/jcYg0CI/M/l35xRmsHHDM270ypZGxQFjXbKKRAXA*/
/*
 * @Description: 表单区lable
 * @Author: llixxm
 */
import React, { Component } from 'react';
import './index.less';

class FormLabel extends Component {
    constructor(props) {
        super(props);
        this.state = {

        }
    }
    static defaultProps = {
        isRequire: false, //是否是必输项,默认不显示*
        labelname: '', //要显示的文字
        showMargin: true, //是否有左边距,默认有
        isSecond: false //是否是一行的第二个,第二个label可能需要边距
    };
    render() {
        let { isRequire, labelname, children, isSecond, showMargin } = this.props
        return(
            <div className={`gl-form-label-container ${showMargin ? 'marging-l-6' : ''}`}>
                {isRequire ? <span className='require'>*</span> : ''}
                <label className={`nc-theme-form-label-c ${isSecond ? 'marging-l-6' : ''}`}>
                    {labelname}
                </label>
                {children}
            </div>
        );
    }
}
export default FormLabel
/*2S7LXljdWdGhrCxZ1MFl4i0/jcYg0CI/M/l35xRmsHHDM270ypZGxQFjXbKKRAXA*/